package com.flower.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.flower.domain.dto.buyer.order.CreateOrderDto;
import com.flower.domain.dto.buyer.order.OrderQueryDto;
import com.flower.domain.dto.buyer.order.PaymentQRCodeDto;
import com.flower.domain.entity.Order;
import com.flower.domain.vo.buyer.OrderDetailVO;
import com.flower.domain.vo.buyer.OrderStatusCountVO;
import com.flower.domain.vo.buyer.OrderVO;
import com.flower.domain.vo.buyer.PaymentQRCodeVO;
import com.flower.domain.vo.buyer.PaymentStatusVO;

/**
* @author 86178
* @description 针对表【order(订单主表)】的数据库操作Service
* @createDate 2025-03-04 12:26:59
*/
public interface OrderService extends IService<Order> {
    // 获取订单列表
    Page<OrderVO> getOrderList(Long buyerId, OrderQueryDto orderQueryDto);
    
    // 获取订单详情
    OrderDetailVO getOrderDetail(Integer orderId, Long buyerId);
    
    // 创建订单
    Order createOrder(CreateOrderDto createOrderDto);
    
    // 取消订单
    void cancelOrder(Integer orderId, Long buyerId);
    
    // 删除订单
    void deleteOrder(Integer orderId, Long buyerId);
    
    // 确认收货
    void confirmReceipt(Integer orderId, Long buyerId);
    
    // 获取支付二维码
    PaymentQRCodeVO getPaymentQRCode(PaymentQRCodeDto paymentQRCodeDto, Long buyerId);
    
    // 检查支付状态
    PaymentStatusVO checkPaymentStatus(Integer orderId, Long buyerId);
    
    // 获取订单状态统计
    OrderStatusCountVO getOrderStatusCount(Long buyerId);

    void payOrder(Integer orderId);

    /**
     * 更新订单状态
     * @param orderId 订单ID
     * @param status 状态
     */
    void updateOrderStatus(Integer orderId, Integer status);
}
